package org.example.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @TableName take_position
 */
@TableName(value = "take_position")
@Data
public class TakePosition implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 股票id
     */
    private Integer stockId;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 成交价格
     */
    private BigDecimal volumePrice;
    /**
     * 成交时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;
    /**
     * 成交编号
     */
    private String volumeCode;

    /**
     * 股票数量
     */
    private Integer num;

    private BigDecimal averagePrice;
    ;
    @TableLogic
    private Integer isdel;
    @TableField(exist = false)
    private String stockName;
    @TableField(exist = false)
    private String stockCode;
    @TableField(exist = false)
    private BigDecimal latestPrice;
    @TableField(exist = false)
    private BigDecimal percentageChange;
    @TableField(exist = false)
    private String username;
    @TableField(exist = false)
    private BigDecimal sellPrice;
    @TableField(exist = false)
    private Integer xvnum;
}